package com.wolf.repository;

import com.wolf.pojo.Wl_category;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

public interface Wl_categoryMapper {
    int deleteByPrimaryKey(String cateid);

    int insert(Wl_category record);

    int insertSelective(Wl_category record);

    Wl_category selectByPrimaryKey(String cateid);

    int updateByPrimaryKeySelective(Wl_category record);

    int updateByPrimaryKey(Wl_category record);

    List<Wl_category> getAll();

    /*
     * 查询id和等级两个列
     * @return
     */
    List<Wl_category> getAllSelective();

    /*
     * 按名称查询分类
     * @return
     */
    List<Wl_category> getCateName(@RequestParam("cateName") String cateName);

    /*
     * 按父类的名称查询ID
     */
    List<String> getCateId(@RequestParam("parentName") String parentName);

    /*
     * 按父类的ID查询子类
     */
    List<Wl_category> getChild(@RequestParam("cateId") String cateId);

    /*
     * 按父类的ID查询父类名称
     */
    Object getByParentName(@RequestParam("parentId") String parentId);

    /**
     * 查询所有名称
     */
    List<Wl_category> getAllCateName();

    /**
     * 活动第一级下拉框
     */
    List<Wl_category> getByCateId();

    /**
     * 优惠卷管理页面商品分类
     * @return
     */
    List<Wl_category> Wl_coupon_getByCateName();
}